package com.qfedu;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @version 1.0
 * 公众号：Java架构栈
 * @Author: 卓不凡
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class Demo {
    @Autowired
    private PasswordEncoder passwordEncoder;
    @Test
    public void demo(){

        String encode = passwordEncoder.encode("123456"); //进行加密
        //$2a$10$dGD.J/V538O/D4C1ZN3x0eTmxejUXijiotMEiAEAKUJCFVBZwIm1C
        //$2a$10$sVTu6sIhU1L8Am10WWXvFOvwfCaBHDq3j6AkrIIFu7EmpRk63Vd3K
        //$2a$10$4VI6xqtW4gi75uYtAU5a1OJhsH5nAsf17U7V6xffkwRcZfGFh45Au
        System.out.println(encode);
    }
}
